package cn.wegoteam.shop.po;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Combo entity. @author MyEclipse Persistence Tools �ײͱ�
 */
@Entity
@Table(name = "combo", catalog = "shop")
public class Combo  extends BasePo implements java.io.Serializable {

	private Integer id;
	private String comboName;// �ײ�����
	private String comboDescibe;// �ײ�����
	private Set<ComboProduct> comboProducts = new HashSet<ComboProduct>(0);
	private int flag;

	// Constructors

	/** default constructor */
	public Combo() {
	}

	/** full constructor */
	public Combo(String comboName, String comboDescibe,
			Set<ComboProduct> comboProducts) {
		this.comboName = comboName;
		this.comboDescibe = comboDescibe;
		this.comboProducts = comboProducts;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "combo_name", length = 32)
	public String getComboName() {
		return this.comboName;
	}

	public void setComboName(String comboName) {
		this.comboName = comboName;
	}

	@Column(name = "combo_descibe", length = 200)
	public String getComboDescibe() {
		return this.comboDescibe;
	}

	public void setComboDescibe(String comboDescibe) {
		this.comboDescibe = comboDescibe;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "combo")
	public Set<ComboProduct> getComboProducts() {
		return this.comboProducts;
	}

	public void setComboProducts(Set<ComboProduct> comboProducts) {
		this.comboProducts = comboProducts;
	}
    @Column(name="flag",insertable=false,nullable=false)
	public Integer getFlag() {
		return flag;
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}

}